(* Content-type: application/vnd.wolfram.mathematica *)

(*** Wolfram Notebook File ***)
(* http://www.wolfram.com/nb *)

(* CreatedBy='Mathematica 11.0' *)

(*CacheID: 234*)
(* Internal cache information:
NotebookFileLineBreakTest
NotebookFileLineBreakTest
NotebookDataPosition[       158,          7]
NotebookDataLength[     55928,       1272]
NotebookOptionsPosition[     53517,       1185]
NotebookOutlinePosition[     53954,       1204]
CellTagsIndexPosition[     53911,       1201]
WindowFrame->Normal*)

(* Beginning of Notebook Content *)
Notebook[{

Cell[CellGroupData[{
Cell["Project Euler 41-50", "Title",
 CellChangeTimes->{
  3.825800593745206*^9, {3.8263444198818674`*^9, 3.8263444208418674`*^9}, {
   3.834630073917598*^9, 3.8346300768655977`*^9}},
 TextAlignment->Center],

Cell[CellGroupData[{

Cell["\[FilledSquare]41. Pandigital prime", "Subsubsection",
 CellChangeTimes->{
  3.825800627408572*^9, {3.8346300813595977`*^9, 3.8346300977205973`*^9}}],

Cell["\<\
We shall say that an n-digit number is pandigital if it makes use of all the \
digits 1 to n exactly once. For example, 2143 is a 4-digit pandigital and is \
also prime.
What is the largest n-digit pandigital prime that exists?\
\>", "Text",
 CellChangeTimes->{
  3.8258006477536063`*^9, {3.8346301102865973`*^9, 3.834630121139598*^9}}],

Cell[CellGroupData[{

Cell[BoxData[{
 RowBox[{
  RowBox[{
   RowBox[{"PandigitQ", "[", "n_", "]"}], ":=", 
   RowBox[{"Module", "[", 
    RowBox[{
     RowBox[{"{", "}"}], ",", "\n", "\t", 
     RowBox[{
      RowBox[{"SequenceCount", "[", 
       RowBox[{
        RowBox[{"{", 
         RowBox[{
         "1", ",", "2", ",", "3", ",", "4", ",", "5", ",", "6", ",", "7", ",",
           "8", ",", "9"}], "}"}], ",", 
        RowBox[{
         RowBox[{"IntegerDigits", "[", "n", "]"}], "//", "Sort"}]}], "]"}], 
      "\[NotEqual]", "0"}]}], "\n", "]"}]}], ";"}], "\n", 
 RowBox[{
  RowBox[{"Select", "[", 
   RowBox[{
    RowBox[{"FromDigits", "/@", 
     RowBox[{"Permutations", "[", 
      RowBox[{
       RowBox[{"{", 
        RowBox[{
        "1", ",", "2", ",", "3", ",", "4", ",", "5", ",", "6", ",", "7", ",", 
         "8", ",", "9"}], "}"}], ",", "9"}], "]"}]}], ",", 
    RowBox[{
     RowBox[{
      RowBox[{"PrimeQ", "[", "#", "]"}], " ", "&&", " ", 
      RowBox[{"PandigitQ", "[", "#", "]"}], " ", "&&", " ", 
      RowBox[{"MemberQ", "[", 
       RowBox[{
        RowBox[{"IntegerDigits", "[", "#", "]"}], ",", "1"}], "]"}]}], 
     "&"}]}], "]"}], "//", "Max"}], "\n"}], "Code",
 CellChangeTimes->{
  3.825800668543685*^9, 3.8346301301215973`*^9, {3.8346302230045977`*^9, 
   3.8346302275655975`*^9}, {3.834630259903598*^9, 3.8346302791555977`*^9}, {
   3.834632265455923*^9, 3.834632315307908*^9}, {3.834632346706047*^9, 
   3.8346324316515408`*^9}, {3.8346324663210077`*^9, 
   3.8346325218745623`*^9}, {3.834632611729547*^9, 3.834632642902664*^9}, {
   3.8346358920375547`*^9, 3.834635899754326*^9}, {3.834636073376686*^9, 
   3.8346360802133703`*^9}, {3.8346361257939277`*^9, 3.834636130031351*^9}, {
   3.834636161143462*^9, 3.8346362442267694`*^9}, {3.834636278065153*^9, 
   3.834636391761522*^9}, {3.8346388513224535`*^9, 3.8346389379891195`*^9}, {
   3.8346415328125443`*^9, 3.8346415560105443`*^9}, {3.83464192137286*^9, 
   3.8346420297606983`*^9}, {3.834642304439163*^9, 3.8346423992536435`*^9}, {
   3.83469889740819*^9, 3.83469890013019*^9}, {3.83469894699119*^9, 
   3.8346989869111896`*^9}, {3.834699416199189*^9, 3.834699456421211*^9}, {
   3.8346995068252506`*^9, 3.8346995131198797`*^9}}],

Cell[BoxData["7652413"], "Output",
 CellChangeTimes->{
  3.8346326443728113`*^9, 3.8346361304453926`*^9, {3.8346361637517233`*^9, 
   3.834636196014949*^9}, {3.8346362262919765`*^9, 3.8346362350268497`*^9}, {
   3.8346362865670033`*^9, 3.834636392222568*^9}, 3.8346389495082707`*^9, 
   3.834641950936816*^9, {3.834642362705989*^9, 3.834642373923111*^9}, {
   3.83469887359719*^9, 3.8346989024951897`*^9}, {3.8346989808601894`*^9, 
   3.8346989922011895`*^9}, 3.8346995185554237`*^9, 3.8721325814454336`*^9}]
}, Open  ]]
}, Open  ]],

Cell[CellGroupData[{

Cell["\[FilledSquare]42. Coded triangle numbers", "Subsubsection",
 CellChangeTimes->{
  3.825800627408572*^9, {3.8346300813595977`*^9, 3.8346300977205973`*^9}, {
   3.834700165964158*^9, 3.834700173167878*^9}}],

Cell[TextData[{
 "The ",
 Cell[BoxData[
  FormBox[
   SuperscriptBox["n", "th"], TraditionalForm]],
  FormatType->"TraditionalForm"],
 " term of the sequence of triangle numbers is given by, ",
 Cell[BoxData[
  FormBox[
   SubscriptBox["t", "n"], TraditionalForm]],
  FormatType->"TraditionalForm"],
 " = \.bdn(n+1); so the first ten triangle numbers are:\n1, 3, 6, 10, 15, 21, \
28, 36, 45, 55, ...\nBy converting each letter in a word to a number \
corresponding to its alphabetical position and adding these values we form a \
word value. For example, the word value for SKY is 19 + 11 + 25 = 55 = ",
 Cell[BoxData[
  FormBox[
   SubscriptBox["t", "10"], TraditionalForm]],
  FormatType->"TraditionalForm"],
 ". If the word value is a triangle number then we shall call the word a \
triangle word.\nUsing words.txt (right click and \[OpenCurlyQuote]Save \
Link/Target As...\[CloseCurlyQuote]), a 16K text file containing nearly \
two-thousand common English words, how many are triangle words?"
}], "Text",
 CellChangeTimes->{
  3.8258006477536063`*^9, {3.8346301102865973`*^9, 3.834630121139598*^9}, {
   3.8347001854861097`*^9, 3.8347001931898804`*^9}, {3.8347003471362734`*^9, 
   3.8347003508666463`*^9}, {3.8347003832158813`*^9, 3.8347004012886877`*^9}}],

Cell[CellGroupData[{

Cell[BoxData[{
 RowBox[{
  RowBox[{
   RowBox[{"TriangleNumberQ", "[", "p_", "]"}], ":=", 
   RowBox[{"Module", "[", 
    RowBox[{
     RowBox[{"{", "}"}], ",", 
     RowBox[{"IntegerQ", "@@", 
      RowBox[{"(", 
       RowBox[{"n", "/.", 
        RowBox[{"Solve", "[", 
         RowBox[{
          RowBox[{
           RowBox[{
            FractionBox[
             RowBox[{"n", 
              RowBox[{"(", 
               RowBox[{"n", "+", "1"}], ")"}]}], "2"], "\[Equal]", "p"}], " ",
            "&&", " ", 
           RowBox[{"n", ">", "0"}]}], ",", "n"}], "]"}]}], ")"}]}]}], "]"}]}],
   ";"}], "\n", 
 RowBox[{
  RowBox[{"Total", "/@", 
   RowBox[{"(", 
    RowBox[{
     RowBox[{
      RowBox[{
       RowBox[{"ToCharacterCode", "[", "#", "]"}], "-", "96"}], "&"}], "/@", 
     RowBox[{"StringSplit", "[", "\n", "\t", 
      RowBox[{
       RowBox[{
        RowBox[{"StringReplace", "[", "\n", "\t\t", 
         RowBox[{
          RowBox[{
          "Import", "[", "\"\<D:/workspace/project-euler/p042_words.txt\>\"", 
           "]"}], ",", 
          RowBox[{"\"\<\\\"\>\"", "\[Rule]", "\"\<\>\""}]}], "]"}], "//", 
        "ToLowerCase"}], ",", "\n", "\t\t", "\"\<,\>\""}], "\n", "\t", 
      "]"}]}], ")"}]}], "//", 
  RowBox[{
   RowBox[{"Select", "[", 
    RowBox[{"#", ",", "TriangleNumberQ"}], "]"}], "&"}]}]}], "Code",
 CellChangeTimes->{
  3.825800668543685*^9, 3.8346301301215973`*^9, {3.8346302230045977`*^9, 
   3.8346302275655975`*^9}, {3.834630259903598*^9, 3.8346302791555977`*^9}, {
   3.834632265455923*^9, 3.834632315307908*^9}, {3.834632346706047*^9, 
   3.8346324316515408`*^9}, {3.8346324663210077`*^9, 
   3.8346325218745623`*^9}, {3.834632611729547*^9, 3.834632642902664*^9}, {
   3.8346358920375547`*^9, 3.834635899754326*^9}, {3.834636073376686*^9, 
   3.8346360802133703`*^9}, {3.8346361257939277`*^9, 3.834636130031351*^9}, {
   3.834636161143462*^9, 3.8346362442267694`*^9}, {3.834636278065153*^9, 
   3.834636391761522*^9}, {3.8346388513224535`*^9, 3.8346389379891195`*^9}, {
   3.8346415328125443`*^9, 3.8346415560105443`*^9}, {3.83464192137286*^9, 
   3.8346420297606983`*^9}, {3.834642304439163*^9, 3.8346423992536435`*^9}, {
   3.83469889740819*^9, 3.83469890013019*^9}, {3.83469894699119*^9, 
   3.8346989869111896`*^9}, {3.834699416199189*^9, 3.834699456421211*^9}, {
   3.8346995068252506`*^9, 3.8346995131198797`*^9}, {3.834700202928854*^9, 
   3.834700211955757*^9}, {3.834700841512706*^9, 3.834701063111864*^9}, {
   3.834701146251177*^9, 3.83470115137869*^9}, {3.834701213523904*^9, 
   3.8347012400485554`*^9}, {3.834701289366487*^9, 3.8347012940049505`*^9}, {
   3.834701325855136*^9, 3.8347013597775273`*^9}, {3.834701798128358*^9, 
   3.834701832689814*^9}, {3.8347025435408916`*^9, 3.8347025438869267`*^9}, {
   3.8347025924427814`*^9, 3.8347026782693634`*^9}, {3.8347027115546913`*^9, 
   3.834702718082344*^9}, {3.8347027777183075`*^9, 3.8347028548490195`*^9}, {
   3.8347032560021305`*^9, 3.8347032591684475`*^9}, 3.8347040721167345`*^9, {
   3.8347041722297444`*^9, 3.834704183266848*^9}, {3.8347042742619467`*^9, 
   3.834704291174638*^9}, {3.8347048040359187`*^9, 3.8347048585574493`*^9}, {
   3.83470489012245*^9, 3.8347049584614496`*^9}, {3.83470504501645*^9, 
   3.8347050499764495`*^9}, {3.8347102744929285`*^9, 3.834710297500229*^9}, 
   3.8347103375252314`*^9}],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{
  "1", ",", "78", ",", "45", ",", "91", ",", "105", ",", "55", ",", "36", ",",
    "28", ",", "66", ",", "15", ",", "66", ",", "91", ",", "91", ",", "78", 
   ",", "78", ",", "21", ",", "120", ",", "10", ",", "21", ",", "28", ",", 
   "21", ",", "28", ",", "55", ",", "55", ",", "36", ",", "45", ",", "45", 
   ",", "78", ",", "55", ",", "28", ",", "78", ",", "66", ",", "28", ",", 
   "36", ",", "55", ",", "91", ",", "36", ",", "78", ",", "78", ",", "153", 
   ",", "171", ",", "91", ",", "55", ",", "136", ",", "78", ",", "105", ",", 
   "91", ",", "91", ",", "78", ",", "136", ",", "45", ",", "21", ",", "105", 
   ",", "45", ",", "120", ",", "66", ",", "15", ",", "28", ",", "66", ",", 
   "28", ",", "36", ",", "66", ",", "66", ",", "66", ",", "45", ",", "91", 
   ",", "91", ",", "55", ",", "91", ",", "36", ",", "66", ",", "36", ",", 
   "36", ",", "36", ",", "15", ",", "78", ",", "78", ",", "136", ",", "105", 
   ",", "153", ",", "66", ",", "120", ",", "28", ",", "36", ",", "45", ",", 
   "45", ",", "66", ",", "55", ",", "78", ",", "91", ",", "28", ",", "45", 
   ",", "78", ",", "45", ",", "78", ",", "55", ",", "45", ",", "28", ",", 
   "66", ",", "55", ",", "91", ",", "21", ",", "36", ",", "66", ",", "66", 
   ",", "136", ",", "55", ",", "55", ",", "45", ",", "91", ",", "91", ",", 
   "91", ",", "91", ",", "105", ",", "105", ",", "120", ",", "45", ",", "28", 
   ",", "36", ",", "55", ",", "78", ",", "120", ",", "105", ",", "91", ",", 
   "36", ",", "66", ",", "45", ",", "45", ",", "120", ",", "66", ",", "55", 
   ",", "55", ",", "120", ",", "55", ",", "120", ",", "91", ",", "78", ",", 
   "136", ",", "45", ",", "45", ",", "91", ",", "91", ",", "153", ",", "66", 
   ",", "78", ",", "105", ",", "78", ",", "66", ",", "55", ",", "120", ",", 
   "66", ",", "45", ",", "105", ",", "66", ",", "55", ",", "36", ",", "55", 
   ",", "55", ",", "28", ",", "91", ",", "78", ",", "66"}], "}"}]], "Output",
 CellChangeTimes->{{3.834703239599491*^9, 3.8347032597795086`*^9}, 
   3.8347040734098635`*^9, {3.83470482034855*^9, 3.8347048601804495`*^9}, {
   3.83470489436045*^9, 3.8347049027854495`*^9}, 3.8347050689414496`*^9, {
   3.834710284426922*^9, 3.834710301630642*^9}, 3.872132585891878*^9}]
}, Open  ]]
}, Open  ]],

Cell[CellGroupData[{

Cell["\[FilledSquare]43. Sub-string divisibility", "Subsubsection",
 CellChangeTimes->{
  3.825800627408572*^9, {3.8346300813595977`*^9, 3.8346300977205973`*^9}, {
   3.834700165964158*^9, 3.834700173167878*^9}, {3.8347104271931973`*^9, 
   3.8347104342419024`*^9}}],

Cell[TextData[{
 "The number, 1406357289, is a 0 to 9 pandigital number because it is made up \
of each of the digits 0 to 9 in some order, but it also has a rather \
interesting sub-string divisibility property.\nLet ",
 Cell[BoxData[
  FormBox[
   SubscriptBox["d", "1"], TraditionalForm]],
  FormatType->"TraditionalForm"],
 " be the ",
 Cell[BoxData[
  FormBox[
   SuperscriptBox["1", "st"], TraditionalForm]],
  FormatType->"TraditionalForm"],
 " digit, ",
 Cell[BoxData[
  FormBox[
   SubscriptBox["d", "2"], TraditionalForm]],
  FormatType->"TraditionalForm"],
 " be the ",
 Cell[BoxData[
  FormBox[
   SuperscriptBox["2", "nd"], TraditionalForm]],
  FormatType->"TraditionalForm"],
 " digit, and so on. In this way, we note the following:\n    ",
 Cell[BoxData[
  FormBox[
   SubscriptBox["d", "2"], TraditionalForm]],
  FormatType->"TraditionalForm"],
 Cell[BoxData[
  FormBox[
   SubscriptBox["d", "3"], TraditionalForm]],
  FormatType->"TraditionalForm"],
 Cell[BoxData[
  FormBox[
   SubscriptBox["d", "4"], TraditionalForm]],
  FormatType->"TraditionalForm"],
 "=406 is divisible by 2\n    ",
 Cell[BoxData[
  FormBox[
   SubscriptBox["d", "3"], TraditionalForm]],
  FormatType->"TraditionalForm"],
 Cell[BoxData[
  FormBox[
   SubscriptBox["d", "4"], TraditionalForm]],
  FormatType->"TraditionalForm"],
 Cell[BoxData[
  FormBox[
   SubscriptBox["d", "5"], TraditionalForm]],
  FormatType->"TraditionalForm"],
 "=063 is divisible by 3\n    ",
 Cell[BoxData[
  FormBox[
   SubscriptBox["d", "4"], TraditionalForm]],
  FormatType->"TraditionalForm"],
 Cell[BoxData[
  FormBox[
   SubscriptBox["d", "5"], TraditionalForm]],
  FormatType->"TraditionalForm"],
 Cell[BoxData[
  FormBox[
   SubscriptBox["d", "6"], TraditionalForm]],
  FormatType->"TraditionalForm"],
 "=635 is divisible by 5\n    ",
 Cell[BoxData[
  FormBox[
   SubscriptBox["d", "5"], TraditionalForm]],
  FormatType->"TraditionalForm"],
 Cell[BoxData[
  FormBox[
   SubscriptBox["d", "6"], TraditionalForm]],
  FormatType->"TraditionalForm"],
 Cell[BoxData[
  FormBox[
   SubscriptBox["d", "7"], TraditionalForm]],
  FormatType->"TraditionalForm"],
 "=357 is divisible by 7\n    ",
 Cell[BoxData[
  FormBox[
   SubscriptBox["d", "6"], TraditionalForm]],
  FormatType->"TraditionalForm"],
 Cell[BoxData[
  FormBox[
   SubscriptBox["d", "7"], TraditionalForm]],
  FormatType->"TraditionalForm"],
 Cell[BoxData[
  FormBox[
   SubscriptBox["d", "8"], TraditionalForm]],
  FormatType->"TraditionalForm"],
 "=572 is divisible by 11\n    ",
 Cell[BoxData[
  FormBox[
   SubscriptBox["d", "7"], TraditionalForm]],
  FormatType->"TraditionalForm"],
 Cell[BoxData[
  FormBox[
   SubscriptBox["d", "8"], TraditionalForm]],
  FormatType->"TraditionalForm"],
 Cell[BoxData[
  FormBox[
   SubscriptBox["d", "9"], TraditionalForm]],
  FormatType->"TraditionalForm"],
 "=728 is divisible by 13\n    ",
 Cell[BoxData[
  FormBox[
   SubscriptBox["d", "8"], TraditionalForm]],
  FormatType->"TraditionalForm"],
 Cell[BoxData[
  FormBox[
   SubscriptBox["d", "9"], TraditionalForm]],
  FormatType->"TraditionalForm"],
 Cell[BoxData[
  FormBox[
   SubscriptBox["d", "10"], TraditionalForm]],
  FormatType->"TraditionalForm"],
 "=289 is divisible by 17\nFind the sum of all 0 to 9 pandigital numbers with \
this property."
}], "Text",
 CellChangeTimes->{
  3.8258006477536063`*^9, {3.8346301102865973`*^9, 3.834630121139598*^9}, {
   3.8347001854861097`*^9, 3.8347001931898804`*^9}, {3.8347003471362734`*^9, 
   3.8347003508666463`*^9}, {3.8347003832158813`*^9, 
   3.8347004012886877`*^9}, {3.8347104396974473`*^9, 3.8347106499684725`*^9}}],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{
  RowBox[{"FromDigits", "/@", 
   RowBox[{"Select", "[", 
    RowBox[{
     RowBox[{"Permutations", "[", 
      RowBox[{"{", 
       RowBox[{
       "0", ",", "1", ",", "2", ",", "3", ",", "4", ",", "5", ",", "6", ",", 
        "7", ",", "8", ",", "9"}], "}"}], "]"}], ",", 
     RowBox[{
      RowBox[{
       RowBox[{
        RowBox[{"#", "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], 
        "\[NotEqual]", "0"}], " ", "&&", "\n", " ", 
       RowBox[{"Divisible", "[", 
        RowBox[{
         RowBox[{"FromDigits", "[", 
          RowBox[{"{", 
           RowBox[{
            RowBox[{
            "#", "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}], ",", 
            RowBox[{
            "#", "\[LeftDoubleBracket]", "3", "\[RightDoubleBracket]"}], ",", 
            RowBox[{
            "#", "\[LeftDoubleBracket]", "4", "\[RightDoubleBracket]"}]}], 
           "}"}], "]"}], ",", "2"}], "]"}], " ", "&&", " ", "\n", " ", 
       RowBox[{"Divisible", "[", 
        RowBox[{
         RowBox[{"FromDigits", "[", 
          RowBox[{"{", 
           RowBox[{
            RowBox[{
            "#", "\[LeftDoubleBracket]", "3", "\[RightDoubleBracket]"}], ",", 
            RowBox[{
            "#", "\[LeftDoubleBracket]", "4", "\[RightDoubleBracket]"}], ",", 
            RowBox[{
            "#", "\[LeftDoubleBracket]", "5", "\[RightDoubleBracket]"}]}], 
           "}"}], "]"}], ",", "3"}], "]"}], " ", "&&", "\n", " ", 
       RowBox[{"Divisible", "[", 
        RowBox[{
         RowBox[{"FromDigits", "[", 
          RowBox[{"{", 
           RowBox[{
            RowBox[{
            "#", "\[LeftDoubleBracket]", "4", "\[RightDoubleBracket]"}], ",", 
            RowBox[{
            "#", "\[LeftDoubleBracket]", "5", "\[RightDoubleBracket]"}], ",", 
            RowBox[{
            "#", "\[LeftDoubleBracket]", "6", "\[RightDoubleBracket]"}]}], 
           "}"}], "]"}], ",", "5"}], "]"}], " ", "&&", "\n", " ", 
       RowBox[{"Divisible", "[", 
        RowBox[{
         RowBox[{"FromDigits", "[", 
          RowBox[{"{", 
           RowBox[{
            RowBox[{
            "#", "\[LeftDoubleBracket]", "5", "\[RightDoubleBracket]"}], ",", 
            RowBox[{
            "#", "\[LeftDoubleBracket]", "6", "\[RightDoubleBracket]"}], ",", 
            RowBox[{
            "#", "\[LeftDoubleBracket]", "7", "\[RightDoubleBracket]"}]}], 
           "}"}], "]"}], ",", "7"}], "]"}], " ", "&&", "\n", " ", 
       RowBox[{"Divisible", "[", 
        RowBox[{
         RowBox[{"FromDigits", "[", 
          RowBox[{"{", 
           RowBox[{
            RowBox[{
            "#", "\[LeftDoubleBracket]", "6", "\[RightDoubleBracket]"}], ",", 
            RowBox[{
            "#", "\[LeftDoubleBracket]", "7", "\[RightDoubleBracket]"}], ",", 
            RowBox[{
            "#", "\[LeftDoubleBracket]", "8", "\[RightDoubleBracket]"}]}], 
           "}"}], "]"}], ",", "11"}], "]"}], " ", "&&", "\n", " ", 
       RowBox[{"Divisible", "[", 
        RowBox[{
         RowBox[{"FromDigits", "[", 
          RowBox[{"{", 
           RowBox[{
            RowBox[{
            "#", "\[LeftDoubleBracket]", "7", "\[RightDoubleBracket]"}], ",", 
            RowBox[{
            "#", "\[LeftDoubleBracket]", "8", "\[RightDoubleBracket]"}], ",", 
            RowBox[{
            "#", "\[LeftDoubleBracket]", "9", "\[RightDoubleBracket]"}]}], 
           "}"}], "]"}], ",", "13"}], "]"}], " ", "&&", "\n", " ", 
       RowBox[{"Divisible", "[", 
        RowBox[{
         RowBox[{"FromDigits", "[", 
          RowBox[{"{", 
           RowBox[{
            RowBox[{
            "#", "\[LeftDoubleBracket]", "8", "\[RightDoubleBracket]"}], ",", 
            RowBox[{
            "#", "\[LeftDoubleBracket]", "9", "\[RightDoubleBracket]"}], ",", 
            RowBox[{
            "#", "\[LeftDoubleBracket]", "10", "\[RightDoubleBracket]"}]}], 
           "}"}], "]"}], ",", "17"}], "]"}]}], "\n", " ", "&"}]}], "]"}]}], "//",
   "Total"}]], "Code",
 CellChangeTimes->{
  3.825800668543685*^9, 3.8346301301215973`*^9, {3.8346302230045977`*^9, 
   3.8346302275655975`*^9}, {3.834630259903598*^9, 3.8346302791555977`*^9}, {
   3.834632265455923*^9, 3.834632315307908*^9}, {3.834632346706047*^9, 
   3.8346324316515408`*^9}, {3.8346324663210077`*^9, 
   3.8346325218745623`*^9}, {3.834632611729547*^9, 3.834632642902664*^9}, {
   3.8346358920375547`*^9, 3.834635899754326*^9}, {3.834636073376686*^9, 
   3.8346360802133703`*^9}, {3.8346361257939277`*^9, 3.834636130031351*^9}, {
   3.834636161143462*^9, 3.8346362442267694`*^9}, {3.834636278065153*^9, 
   3.834636391761522*^9}, {3.8346388513224535`*^9, 3.8346389379891195`*^9}, {
   3.8346415328125443`*^9, 3.8346415560105443`*^9}, {3.83464192137286*^9, 
   3.8346420297606983`*^9}, {3.834642304439163*^9, 3.8346423992536435`*^9}, {
   3.83469889740819*^9, 3.83469890013019*^9}, {3.83469894699119*^9, 
   3.8346989869111896`*^9}, {3.834699416199189*^9, 3.834699456421211*^9}, {
   3.8346995068252506`*^9, 3.8346995131198797`*^9}, {3.834700202928854*^9, 
   3.834700211955757*^9}, {3.834700841512706*^9, 3.834701063111864*^9}, {
   3.834701146251177*^9, 3.83470115137869*^9}, {3.834701213523904*^9, 
   3.8347012400485554`*^9}, {3.834701289366487*^9, 3.8347012940049505`*^9}, {
   3.834701325855136*^9, 3.8347013597775273`*^9}, {3.834701798128358*^9, 
   3.834701832689814*^9}, {3.8347025435408916`*^9, 3.8347025438869267`*^9}, {
   3.8347025924427814`*^9, 3.8347026782693634`*^9}, {3.8347027115546913`*^9, 
   3.834702718082344*^9}, {3.8347027777183075`*^9, 3.8347028548490195`*^9}, {
   3.8347032560021305`*^9, 3.8347032591684475`*^9}, 3.8347040721167345`*^9, {
   3.8347041722297444`*^9, 3.834704183266848*^9}, {3.8347042742619467`*^9, 
   3.834704291174638*^9}, {3.8347048040359187`*^9, 3.8347048585574493`*^9}, {
   3.83470489012245*^9, 3.8347049584614496`*^9}, {3.83470504501645*^9, 
   3.8347050499764495`*^9}, {3.8347102744929285`*^9, 3.834710297500229*^9}, 
   3.8347103375252314`*^9, {3.834711161682639*^9, 3.8347111781402845`*^9}, {
   3.834711572308697*^9, 3.834711573848851*^9}, {3.8347116140468707`*^9, 
   3.834711677401205*^9}, {3.834711990194482*^9, 3.834712056527114*^9}, {
   3.8347125718506413`*^9, 3.834712590995556*^9}, {3.8347126241658726`*^9, 
   3.8347128871961727`*^9}}],

Cell[BoxData["$Aborted"], "Output",
 CellChangeTimes->{{3.834703239599491*^9, 3.8347032597795086`*^9}, 
   3.8347040734098635`*^9, {3.83470482034855*^9, 3.8347048601804495`*^9}, {
   3.83470489436045*^9, 3.8347049027854495`*^9}, 3.8347050689414496`*^9, {
   3.834710284426922*^9, 3.834710301630642*^9}, 3.834711179969467*^9, 
   3.834711682282694*^9, 3.8347120231757793`*^9, {3.8347125773081875`*^9, 
   3.834712591415598*^9}, {3.8347126248599415`*^9, 3.8347126461480703`*^9}, 
   3.834712737104165*^9, 3.834712880625516*^9, 3.8347129268361363`*^9, 
   3.8721326072850175`*^9}]
}, Open  ]]
}, Open  ]],

Cell[CellGroupData[{

Cell["\[FilledSquare]44. Pentagon numbers", "Subsubsection",
 CellChangeTimes->{
  3.825800627408572*^9, {3.8346300813595977`*^9, 3.8346300977205973`*^9}, {
   3.834700165964158*^9, 3.834700173167878*^9}, {3.8347104271931973`*^9, 
   3.8347104342419024`*^9}, {3.834712980725525*^9, 3.83471298277773*^9}}],

Cell[TextData[{
 "Pentagonal numbers are generated by the formula, ",
 Cell[BoxData[
  FormBox[
   SubscriptBox["P", "n"], TraditionalForm]]],
 "=n(3n\[Minus]1)/2. The first ten pentagonal numbers are:\n1, 5, 12, 22, 35, \
51, 70, 92, 117, 145, ...\nIt can be seen that P4 + P7 = 22 + 70 = 92 = P8. \
However, their difference, 70 \[Minus] 22 = 48, is not pentagonal.\nFind the \
pair of pentagonal numbers, ",
 Cell[BoxData[
  FormBox[
   SubscriptBox["P", "j"], TraditionalForm]]],
 " and ",
 Cell[BoxData[
  FormBox[
   SubscriptBox["P", "k"], TraditionalForm]]],
 ", for which their sum and difference are pentagonal and D = |",
 Cell[BoxData[
  FormBox[
   SubscriptBox["P", "k"], TraditionalForm]]],
 " \[Minus] ",
 Cell[BoxData[
  FormBox[
   SubscriptBox["P", "j"], TraditionalForm]]],
 "| is minimized; what is the value of D?"
}], "Text",
 CellChangeTimes->{
  3.8258006477536063`*^9, {3.8346301102865973`*^9, 3.834630121139598*^9}, {
   3.8347001854861097`*^9, 3.8347001931898804`*^9}, {3.8347003471362734`*^9, 
   3.8347003508666463`*^9}, {3.8347003832158813`*^9, 
   3.8347004012886877`*^9}, {3.8347104396974473`*^9, 
   3.8347106499684725`*^9}, {3.834712987471199*^9, 3.8347130425857105`*^9}}],

Cell[BoxData[""], "Code",
 CellChangeTimes->{
  3.825800668543685*^9, 3.8346301301215973`*^9, {3.8346302230045977`*^9, 
   3.8346302275655975`*^9}, {3.834630259903598*^9, 3.8346302791555977`*^9}, {
   3.834632265455923*^9, 3.834632315307908*^9}, {3.834632346706047*^9, 
   3.8346324316515408`*^9}, {3.8346324663210077`*^9, 
   3.8346325218745623`*^9}, {3.834632611729547*^9, 3.834632642902664*^9}, {
   3.8346358920375547`*^9, 3.834635899754326*^9}, {3.834636073376686*^9, 
   3.8346360802133703`*^9}, {3.8346361257939277`*^9, 3.834636130031351*^9}, {
   3.834636161143462*^9, 3.8346362442267694`*^9}, {3.834636278065153*^9, 
   3.834636391761522*^9}, {3.8346388513224535`*^9, 3.8346389379891195`*^9}, {
   3.8346415328125443`*^9, 3.8346415560105443`*^9}, {3.83464192137286*^9, 
   3.8346420297606983`*^9}, {3.834642304439163*^9, 3.8346423992536435`*^9}, {
   3.83469889740819*^9, 3.83469890013019*^9}, {3.83469894699119*^9, 
   3.8346989869111896`*^9}, {3.834699416199189*^9, 3.834699456421211*^9}, {
   3.8346995068252506`*^9, 3.8346995131198797`*^9}, {3.834700202928854*^9, 
   3.834700211955757*^9}, {3.834700841512706*^9, 3.834701063111864*^9}, {
   3.834701146251177*^9, 3.83470115137869*^9}, {3.834701213523904*^9, 
   3.8347012400485554`*^9}, {3.834701289366487*^9, 3.8347012940049505`*^9}, {
   3.834701325855136*^9, 3.8347013597775273`*^9}, {3.834701798128358*^9, 
   3.834701832689814*^9}, {3.8347025435408916`*^9, 3.8347025438869267`*^9}, {
   3.8347025924427814`*^9, 3.8347026782693634`*^9}, {3.8347027115546913`*^9, 
   3.834702718082344*^9}, {3.8347027777183075`*^9, 3.8347028548490195`*^9}, {
   3.8347032560021305`*^9, 3.8347032591684475`*^9}, 3.8347040721167345`*^9, {
   3.8347041722297444`*^9, 3.834704183266848*^9}, {3.8347042742619467`*^9, 
   3.834704291174638*^9}, {3.8347048040359187`*^9, 3.8347048585574493`*^9}, {
   3.83470489012245*^9, 3.8347049584614496`*^9}, {3.83470504501645*^9, 
   3.8347050499764495`*^9}, {3.8347102744929285`*^9, 3.834710297500229*^9}, 
   3.8347103375252314`*^9, {3.834711161682639*^9, 3.8347111781402845`*^9}, {
   3.834711572308697*^9, 3.834711573848851*^9}, {3.8347116140468707`*^9, 
   3.834711677401205*^9}, {3.834711990194482*^9, 3.834712056527114*^9}, {
   3.8347125718506413`*^9, 3.834712590995556*^9}, {3.8347126241658726`*^9, 
   3.8347128871961727`*^9}, {3.8350566733295574`*^9, 3.8350566780420284`*^9}}]
}, Open  ]],

Cell[CellGroupData[{

Cell["\[FilledSquare]45. Triangular, pentagonal, and hexagonal", \
"Subsubsection",
 CellChangeTimes->{
  3.825800627408572*^9, {3.8346300813595977`*^9, 3.8346300977205973`*^9}, {
   3.834700165964158*^9, 3.834700173167878*^9}, {3.8347104271931973`*^9, 
   3.8347104342419024`*^9}, {3.834712980725525*^9, 3.83471298277773*^9}, 
   3.8350564587130947`*^9, 3.871095596547323*^9}],

Cell["\<\
Triangle, pentagonal, and hexagonal numbers are generated by the following \
formulae:
 \t \t 
Triangle\tTn=n(n+1)/2\t1, 3, 6, 10, 15, \[Ellipsis]
Pentagonal\tPn=n(3n\[Minus]1)/2\t1, 5, 12, 22, 35, \[Ellipsis]
Hexagonal\tHn=n(2n\[Minus]1)\t1, 6, 15, 28, 45, \[Ellipsis]
It can be verified that T285 = P165 = H143 = 40755.

Find the next triangle number that is also pentagonal and hexagonal.\
\>", "Text",
 CellChangeTimes->{
  3.8258006477536063`*^9, {3.8346301102865973`*^9, 3.834630121139598*^9}, {
   3.8347001854861097`*^9, 3.8347001931898804`*^9}, {3.8347003471362734`*^9, 
   3.8347003508666463`*^9}, {3.8347003832158813`*^9, 
   3.8347004012886877`*^9}, {3.8347104396974473`*^9, 
   3.8347106499684725`*^9}, {3.834712987471199*^9, 3.8347130425857105`*^9}, {
   3.871095605592228*^9, 3.8710956137700453`*^9}}],

Cell[BoxData[
 RowBox[{"(*", 
  RowBox[{
  "\:662f\:516d\:8fb9\:5f62\:6570\:4e00\:5b9a\:662f\:4e09\:89d2\:5f62\:6570", 
   "\:ff0c", "\:6240\:4ee5\:904d\:5386\:516d\:8fb9\:5f62\:6570", "\:ff0c", 
   "\:5224\:65ad\:662f\:4e0d\:662f\:4e94\:8fb9\:5f62\:6570"}], "*)"}]], "Code",
 CellChangeTimes->{
  3.825800668543685*^9, 3.8346301301215973`*^9, {3.8346302230045977`*^9, 
   3.8346302275655975`*^9}, {3.834630259903598*^9, 3.8346302791555977`*^9}, {
   3.834632265455923*^9, 3.834632315307908*^9}, {3.834632346706047*^9, 
   3.8346324316515408`*^9}, {3.8346324663210077`*^9, 
   3.8346325218745623`*^9}, {3.834632611729547*^9, 3.834632642902664*^9}, {
   3.8346358920375547`*^9, 3.834635899754326*^9}, {3.834636073376686*^9, 
   3.8346360802133703`*^9}, {3.8346361257939277`*^9, 3.834636130031351*^9}, {
   3.834636161143462*^9, 3.8346362442267694`*^9}, {3.834636278065153*^9, 
   3.834636391761522*^9}, {3.8346388513224535`*^9, 3.8346389379891195`*^9}, {
   3.8346415328125443`*^9, 3.8346415560105443`*^9}, {3.83464192137286*^9, 
   3.8346420297606983`*^9}, {3.834642304439163*^9, 3.8346423992536435`*^9}, {
   3.83469889740819*^9, 3.83469890013019*^9}, {3.83469894699119*^9, 
   3.8346989869111896`*^9}, {3.834699416199189*^9, 3.834699456421211*^9}, {
   3.8346995068252506`*^9, 3.8346995131198797`*^9}, {3.834700202928854*^9, 
   3.834700211955757*^9}, {3.834700841512706*^9, 3.834701063111864*^9}, {
   3.834701146251177*^9, 3.83470115137869*^9}, {3.834701213523904*^9, 
   3.8347012400485554`*^9}, {3.834701289366487*^9, 3.8347012940049505`*^9}, {
   3.834701325855136*^9, 3.8347013597775273`*^9}, {3.834701798128358*^9, 
   3.834701832689814*^9}, {3.8347025435408916`*^9, 3.8347025438869267`*^9}, {
   3.8347025924427814`*^9, 3.8347026782693634`*^9}, {3.8347027115546913`*^9, 
   3.834702718082344*^9}, {3.8347027777183075`*^9, 3.8347028548490195`*^9}, {
   3.8347032560021305`*^9, 3.8347032591684475`*^9}, 3.8347040721167345`*^9, {
   3.8347041722297444`*^9, 3.834704183266848*^9}, {3.8347042742619467`*^9, 
   3.834704291174638*^9}, {3.8347048040359187`*^9, 3.8347048585574493`*^9}, {
   3.83470489012245*^9, 3.8347049584614496`*^9}, {3.83470504501645*^9, 
   3.8347050499764495`*^9}, {3.8347102744929285`*^9, 3.834710297500229*^9}, 
   3.8347103375252314`*^9, {3.834711161682639*^9, 3.8347111781402845`*^9}, {
   3.834711572308697*^9, 3.834711573848851*^9}, {3.8347116140468707`*^9, 
   3.834711677401205*^9}, {3.834711990194482*^9, 3.834712056527114*^9}, {
   3.8347125718506413`*^9, 3.834712590995556*^9}, {3.8347126241658726`*^9, 
   3.8347128871961727`*^9}, 3.8350566757107954`*^9, {3.871098076341278*^9, 
   3.871098079201564*^9}, {3.871098210545697*^9, 3.871098233205963*^9}, {
   3.8714359299301186`*^9, 3.871435941115237*^9}, {3.871518730699705*^9, 
   3.8715187677374086`*^9}}]
}, Open  ]],

Cell[CellGroupData[{

Cell["\[FilledSquare]46. Goldbach\[CloseCurlyQuote]s other conjecture", \
"Subsubsection",
 CellChangeTimes->{
  3.825800627408572*^9, {3.8346300813595977`*^9, 3.8346300977205973`*^9}, {
   3.834700165964158*^9, 3.834700173167878*^9}, {3.8347104271931973`*^9, 
   3.8347104342419024`*^9}, {3.834712980725525*^9, 3.83471298277773*^9}, 
   3.8350564587130947`*^9, 3.871095596547323*^9, 3.871518778771512*^9, 
   3.8715188816367974`*^9}],

Cell[TextData[{
 "It was proposed by Christian Goldbach that every odd composite number can \
be written as the sum of a prime and twice a square.\n\n9 = 7 + ",
 Cell[BoxData[
  FormBox[
   RowBox[{"2", "\[Times]", 
    SuperscriptBox["1", "2"]}], TraditionalForm]],
  FormatType->"TraditionalForm"],
 "\n15 = 7 + ",
 Cell[BoxData[
  FormBox[
   RowBox[{"2", "\[Times]", 
    SuperscriptBox["2", "2"]}], TraditionalForm]],
  FormatType->"TraditionalForm"],
 "\n21 = 3 + ",
 Cell[BoxData[
  FormBox[
   RowBox[{"2", "\[Times]", 
    SuperscriptBox["3", "2"]}], TraditionalForm]],
  FormatType->"TraditionalForm"],
 "\n25 = 7 + ",
 Cell[BoxData[
  FormBox[
   RowBox[{"2", "\[Times]", 
    SuperscriptBox["3", "2"]}], TraditionalForm]],
  FormatType->"TraditionalForm"],
 "\n27 = 19 + ",
 Cell[BoxData[
  FormBox[
   RowBox[{"2", "\[Times]", 
    SuperscriptBox["2", "2"]}], TraditionalForm]],
  FormatType->"TraditionalForm"],
 "\n33 = 31 + ",
 Cell[BoxData[
  FormBox[
   RowBox[{"2", "\[Times]", 
    SuperscriptBox["1", "2"]}], TraditionalForm]],
  FormatType->"TraditionalForm"],
 "\n\nIt turns out that the conjecture was false.\n\nWhat is the smallest odd \
composite that cannot be written as the sum of a prime and twice a square?"
}], "Text",
 CellChangeTimes->{
  3.8258006477536063`*^9, {3.8346301102865973`*^9, 3.834630121139598*^9}, {
   3.8347001854861097`*^9, 3.8347001931898804`*^9}, {3.8347003471362734`*^9, 
   3.8347003508666463`*^9}, {3.8347003832158813`*^9, 
   3.8347004012886877`*^9}, {3.8347104396974473`*^9, 
   3.8347106499684725`*^9}, {3.834712987471199*^9, 3.8347130425857105`*^9}, {
   3.871095605592228*^9, 3.8710956137700453`*^9}, {3.871518867153349*^9, 
   3.8715188869073243`*^9}, {3.871518990423675*^9, 3.8715190152761602`*^9}}],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{
  RowBox[{"(*", 
   RowBox[{"\:6765\:81eaIsaac", "-", "Sun\:7684\:7b54\:6848"}], "*)"}], "\n", 
  RowBox[{
   RowBox[{
    RowBox[{
     RowBox[{"GoldbachNumberQ", "[", "n_Integer", "]"}], " ", ":=", " ", "\n", 
     RowBox[{"(*", 
      RowBox[{
      "\:4ece1\:5230n\:7684\:7d20\:6570\:5217\:8868\:4e2d\:90fd\:8fd0\:7528\
\:8fd9\:4e2a\:8ba1\:7b97", "\:ff1a", 
       "\:6bcf\:4e00\:4e2a\:5947\:5408\:6570\:51cf\:53bb\:8fd9\:4e2a\:8d28\
\:6570\:9664\:4ee52\:518d\:5f00\:5e73\:65b9\:540e\:662f\:4e0d\:662f\:6574\
\:6570"}], "*)"}], "\n", " ", 
     RowBox[{"AnyTrue", "[", 
      RowBox[{
       RowBox[{
        RowBox[{
         RowBox[{"Sqrt", "[", 
          RowBox[{
           RowBox[{"(", 
            RowBox[{"n", " ", "-", " ", "#"}], ")"}], "/", "2"}], "]"}], " ", 
         "&"}], " ", "/@", " ", 
        RowBox[{"Table", "[", 
         RowBox[{
          RowBox[{"Prime", "[", "i", "]"}], ",", " ", 
          RowBox[{"{", 
           RowBox[{"i", ",", " ", "1", ",", " ", 
            RowBox[{"PrimePi", "[", "n", "]"}]}], "}"}]}], "]"}]}], ",", " ", 
       "\n", "  ", "IntegerQ"}], "]"}]}], ";"}], "\n", 
   RowBox[{"(*", 
    RowBox[{
     RowBox[{"#", "+", 
      RowBox[{
      "2", "\:662f\:56e0\:4e3a\:6bcf\:6b21\:52a02\:90fd\:662f\:4e0b\:4e00\
\:4e2a\:5947\:6570"}]}], "\:ff0c", 
     "\:8fd9\:53e5\:8bdd\:7684\:610f\:601d\:662f\:5bf9\:4e8e\:4ece9\:5f00\
\:59cb\:7684\:6bcf\:4e00\:4e2a\:5947\:6570", "\:ff0c", 
     "\:5224\:65ad\:5176\:662f\:5426\:54e5\:5fb7\:5df4\:8d6b\:6570"}], "*)"}],
    "\n", 
   RowBox[{"(*", 
    RowBox[{
    "\:5d4c\:5957\:5217\:8868\:7684\:5224\:5b9a\:662f\:4e0d\:518d\:4e3atrue\
\:65f6\:7ec8\:6b62", "\:ff0c", 
     "\:6240\:4ee5\:540e\:9762\:7684\:5f97\:662f\:771f", "\:ff0c", 
     "\:8981\:51cf\:5c11\:8fd0\:7b97\:91cf", "\:ff0c", 
     "\:5f97\:4f7f\:5f97\:5982\:679c\:8f93\:5165\:4e3a\:8d28\:6570\:5c31\:4e0d\
\:5224\:65ad\:662f\:5426\:54e5\:5fb7\:5df4\:8d6b\:6570", "\:ff0c", 
     "\:6240\:4ee5\:4e2d\:95f4\:7528\:6216"}], "*)"}], "\n", 
   RowBox[{"NestWhile", "[", 
    RowBox[{
     RowBox[{
      RowBox[{"#", " ", "+", " ", "2"}], " ", "&"}], ",", " ", "9", ",", 
     RowBox[{
      RowBox[{
       RowBox[{"PrimeQ", "[", "#", "]"}], " ", "\[Or]", " ", 
       RowBox[{"GoldbachNumberQ", "[", "#", "]"}]}], " ", "&"}]}], 
    "]"}]}]}]], "Code",
 CellChangeTimes->{
  3.825800668543685*^9, 3.8346301301215973`*^9, {3.8346302230045977`*^9, 
   3.8346302275655975`*^9}, {3.834630259903598*^9, 3.8346302791555977`*^9}, {
   3.834632265455923*^9, 3.834632315307908*^9}, {3.834632346706047*^9, 
   3.8346324316515408`*^9}, {3.8346324663210077`*^9, 
   3.8346325218745623`*^9}, {3.834632611729547*^9, 3.834632642902664*^9}, {
   3.8346358920375547`*^9, 3.834635899754326*^9}, {3.834636073376686*^9, 
   3.8346360802133703`*^9}, {3.8346361257939277`*^9, 3.834636130031351*^9}, {
   3.834636161143462*^9, 3.8346362442267694`*^9}, {3.834636278065153*^9, 
   3.834636391761522*^9}, {3.8346388513224535`*^9, 3.8346389379891195`*^9}, {
   3.8346415328125443`*^9, 3.8346415560105443`*^9}, {3.83464192137286*^9, 
   3.8346420297606983`*^9}, {3.834642304439163*^9, 3.8346423992536435`*^9}, {
   3.83469889740819*^9, 3.83469890013019*^9}, {3.83469894699119*^9, 
   3.8346989869111896`*^9}, {3.834699416199189*^9, 3.834699456421211*^9}, {
   3.8346995068252506`*^9, 3.8346995131198797`*^9}, {3.834700202928854*^9, 
   3.834700211955757*^9}, {3.834700841512706*^9, 3.834701063111864*^9}, {
   3.834701146251177*^9, 3.83470115137869*^9}, {3.834701213523904*^9, 
   3.8347012400485554`*^9}, {3.834701289366487*^9, 3.8347012940049505`*^9}, {
   3.834701325855136*^9, 3.8347013597775273`*^9}, {3.834701798128358*^9, 
   3.834701832689814*^9}, {3.8347025435408916`*^9, 3.8347025438869267`*^9}, {
   3.8347025924427814`*^9, 3.8347026782693634`*^9}, {3.8347027115546913`*^9, 
   3.834702718082344*^9}, {3.8347027777183075`*^9, 3.8347028548490195`*^9}, {
   3.8347032560021305`*^9, 3.8347032591684475`*^9}, 3.8347040721167345`*^9, {
   3.8347041722297444`*^9, 3.834704183266848*^9}, {3.8347042742619467`*^9, 
   3.834704291174638*^9}, {3.8347048040359187`*^9, 3.8347048585574493`*^9}, {
   3.83470489012245*^9, 3.8347049584614496`*^9}, {3.83470504501645*^9, 
   3.8347050499764495`*^9}, {3.8347102744929285`*^9, 3.834710297500229*^9}, 
   3.8347103375252314`*^9, {3.834711161682639*^9, 3.8347111781402845`*^9}, {
   3.834711572308697*^9, 3.834711573848851*^9}, {3.8347116140468707`*^9, 
   3.834711677401205*^9}, {3.834711990194482*^9, 3.834712056527114*^9}, {
   3.8347125718506413`*^9, 3.834712590995556*^9}, {3.8347126241658726`*^9, 
   3.8347128871961727`*^9}, 3.8350566757107954`*^9, {3.871098076341278*^9, 
   3.871098079201564*^9}, {3.871098210545697*^9, 3.871098233205963*^9}, {
   3.8714359299301186`*^9, 3.871435941115237*^9}, {3.871518730699705*^9, 
   3.8715187677374086`*^9}, 3.8715188917378073`*^9, 3.8715191321108427`*^9, 
   3.871519448166445*^9, {3.8715203289785175`*^9, 3.8715203369313126`*^9}, {
   3.8715214583495803`*^9, 3.87152151608358*^9}, {3.87152175358158*^9, 
   3.8715218010075803`*^9}, {3.871522118658477*^9, 3.871522146611272*^9}, {
   3.871522177291339*^9, 3.8715222069443045`*^9}, {3.8715222376583757`*^9, 
   3.8715223084774566`*^9}, {3.8715223532389326`*^9, 3.871522355857194*^9}, {
   3.8715224302876368`*^9, 3.8715224338899965`*^9}, {3.871522493537961*^9, 
   3.8715225566202683`*^9}, {3.871522806253229*^9, 3.8715228354241457`*^9}, {
   3.8715229052851315`*^9, 3.8715229210277057`*^9}, {3.8715229959381957`*^9, 
   3.8715230806136627`*^9}}],

Cell[BoxData["5777"], "Output",
 CellChangeTimes->{
  3.871519462094837*^9, 3.87152176848358*^9, {3.8715223500116096`*^9, 
   3.871522358764485*^9}, 3.8715224372073283`*^9, 3.871522510395646*^9, {
   3.871522817968401*^9, 3.8715228363472385`*^9}, {3.871522907407344*^9, 
   3.871522921886791*^9}, 3.8715230122868304`*^9}]
}, Open  ]]
}, Open  ]],

Cell[CellGroupData[{

Cell["\[FilledSquare]47. Distinct primes factors", "Subsubsection",
 CellChangeTimes->{
  3.825800627408572*^9, {3.8346300813595977`*^9, 3.8346300977205973`*^9}, {
   3.834700165964158*^9, 3.834700173167878*^9}, {3.8347104271931973`*^9, 
   3.8347104342419024`*^9}, {3.834712980725525*^9, 3.83471298277773*^9}, 
   3.8350564587130947`*^9, 3.871095596547323*^9, 3.871518778771512*^9, 
   3.8715188816367974`*^9, 3.8715232832339225`*^9, 3.871523326033202*^9}],

Cell[TextData[{
 "The first two consecutive numbers to have two distinct prime factors are:\n\
\n14 = 2 \[Times] 7 15 = 3 \[Times] 5\nThe first three consecutive numbers to \
have three distinct prime factors are:\n\n644 = ",
 Cell[BoxData[
  FormBox[
   SuperscriptBox["2", "2"], TraditionalForm]],
  FormatType->"TraditionalForm"],
 " \[Times] 7 \[Times] 23 645 = 3 \[Times] 5 \[Times] 43 646 = 2 \[Times] 17 \
\[Times] 19\nFind the first four consecutive integers to have four distinct \
prime factors. What is the first of these numbers?"
}], "Text",
 CellChangeTimes->{
  3.8258006477536063`*^9, {3.8346301102865973`*^9, 3.834630121139598*^9}, {
   3.8347001854861097`*^9, 3.8347001931898804`*^9}, {3.8347003471362734`*^9, 
   3.8347003508666463`*^9}, {3.8347003832158813`*^9, 
   3.8347004012886877`*^9}, {3.8347104396974473`*^9, 
   3.8347106499684725`*^9}, {3.834712987471199*^9, 3.8347130425857105`*^9}, {
   3.871095605592228*^9, 3.8710956137700453`*^9}, {3.871518867153349*^9, 
   3.8715188869073243`*^9}, {3.871518990423675*^9, 3.8715190152761602`*^9}, {
   3.8715233156041594`*^9, 3.871523329240523*^9}, {3.8715234568092785`*^9, 
   3.8715234642130184`*^9}}],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"NestWhile", "[", "\n", 
  RowBox[{
   RowBox[{
    RowBox[{"#", "+", "1"}], " ", "&"}], ",", "\n", "1000", ",", "\n", 
   RowBox[{
    RowBox[{"Not", "[", 
     RowBox[{
      RowBox[{"(", 
       RowBox[{
        RowBox[{"(", 
         RowBox[{
          RowBox[{"FactorInteger", "[", "#", "]"}], "//", "Length"}], ")"}], 
        " ", "\[Equal]", " ", "4"}], ")"}], " ", "\[And]", " ", 
      RowBox[{"(", 
       RowBox[{
        RowBox[{"(", 
         RowBox[{
          RowBox[{"FactorInteger", "[", 
           RowBox[{"#", "+", "1"}], "]"}], "//", "Length"}], ")"}], " ", 
        "\[Equal]", " ", "4"}], ")"}], "\[And]", " ", 
      RowBox[{"(", 
       RowBox[{
        RowBox[{"(", 
         RowBox[{
          RowBox[{"FactorInteger", "[", 
           RowBox[{"#", "+", "2"}], "]"}], "//", "Length"}], ")"}], " ", 
        "\[Equal]", " ", "4"}], ")"}], "\[And]", " ", 
      RowBox[{"(", 
       RowBox[{
        RowBox[{"(", 
         RowBox[{
          RowBox[{"FactorInteger", "[", 
           RowBox[{"#", "+", "3"}], "]"}], "//", "Length"}], ")"}], " ", 
        "\[Equal]", " ", "4"}], ")"}]}], "]"}], " ", "&"}]}], "]"}]], "Code",
 CellChangeTimes->{
  3.825800668543685*^9, 3.8346301301215973`*^9, {3.8346302230045977`*^9, 
   3.8346302275655975`*^9}, {3.834630259903598*^9, 3.8346302791555977`*^9}, {
   3.834632265455923*^9, 3.834632315307908*^9}, {3.834632346706047*^9, 
   3.8346324316515408`*^9}, {3.8346324663210077`*^9, 
   3.8346325218745623`*^9}, {3.834632611729547*^9, 3.834632642902664*^9}, {
   3.8346358920375547`*^9, 3.834635899754326*^9}, {3.834636073376686*^9, 
   3.8346360802133703`*^9}, {3.8346361257939277`*^9, 3.834636130031351*^9}, {
   3.834636161143462*^9, 3.8346362442267694`*^9}, {3.834636278065153*^9, 
   3.834636391761522*^9}, {3.8346388513224535`*^9, 3.8346389379891195`*^9}, {
   3.8346415328125443`*^9, 3.8346415560105443`*^9}, {3.83464192137286*^9, 
   3.8346420297606983`*^9}, {3.834642304439163*^9, 3.8346423992536435`*^9}, {
   3.83469889740819*^9, 3.83469890013019*^9}, {3.83469894699119*^9, 
   3.8346989869111896`*^9}, {3.834699416199189*^9, 3.834699456421211*^9}, {
   3.8346995068252506`*^9, 3.8346995131198797`*^9}, {3.834700202928854*^9, 
   3.834700211955757*^9}, {3.834700841512706*^9, 3.834701063111864*^9}, {
   3.834701146251177*^9, 3.83470115137869*^9}, {3.834701213523904*^9, 
   3.8347012400485554`*^9}, {3.834701289366487*^9, 3.8347012940049505`*^9}, {
   3.834701325855136*^9, 3.8347013597775273`*^9}, {3.834701798128358*^9, 
   3.834701832689814*^9}, {3.8347025435408916`*^9, 3.8347025438869267`*^9}, {
   3.8347025924427814`*^9, 3.8347026782693634`*^9}, {3.8347027115546913`*^9, 
   3.834702718082344*^9}, {3.8347027777183075`*^9, 3.8347028548490195`*^9}, {
   3.8347032560021305`*^9, 3.8347032591684475`*^9}, 3.8347040721167345`*^9, {
   3.8347041722297444`*^9, 3.834704183266848*^9}, {3.8347042742619467`*^9, 
   3.834704291174638*^9}, {3.8347048040359187`*^9, 3.8347048585574493`*^9}, {
   3.83470489012245*^9, 3.8347049584614496`*^9}, {3.83470504501645*^9, 
   3.8347050499764495`*^9}, {3.8347102744929285`*^9, 3.834710297500229*^9}, 
   3.8347103375252314`*^9, {3.834711161682639*^9, 3.8347111781402845`*^9}, {
   3.834711572308697*^9, 3.834711573848851*^9}, {3.8347116140468707`*^9, 
   3.834711677401205*^9}, {3.834711990194482*^9, 3.834712056527114*^9}, {
   3.8347125718506413`*^9, 3.834712590995556*^9}, {3.8347126241658726`*^9, 
   3.8347128871961727`*^9}, 3.8350566757107954`*^9, {3.871098076341278*^9, 
   3.871098079201564*^9}, {3.871098210545697*^9, 3.871098233205963*^9}, {
   3.8714359299301186`*^9, 3.871435941115237*^9}, {3.871518730699705*^9, 
   3.8715187677374086`*^9}, 3.8715188917378073`*^9, 3.8715191321108427`*^9, 
   3.871519448166445*^9, {3.8715203289785175`*^9, 3.8715203369313126`*^9}, {
   3.8715214583495803`*^9, 3.87152151608358*^9}, {3.87152175358158*^9, 
   3.8715218010075803`*^9}, {3.871522118658477*^9, 3.871522146611272*^9}, {
   3.871522177291339*^9, 3.8715222069443045`*^9}, {3.8715222376583757`*^9, 
   3.8715223084774566`*^9}, {3.8715223532389326`*^9, 3.871522355857194*^9}, {
   3.8715224302876368`*^9, 3.8715224338899965`*^9}, {3.871522493537961*^9, 
   3.8715225566202683`*^9}, {3.871522806253229*^9, 3.8715228354241457`*^9}, {
   3.8715229052851315`*^9, 3.8715229210277057`*^9}, {3.8715229959381957`*^9, 
   3.8715230806136627`*^9}, {3.871523486142211*^9, 3.8715235162482214`*^9}, {
   3.871523599053501*^9, 3.871523628950491*^9}, {3.8715236834759426`*^9, 
   3.871523809941588*^9}, {3.87152384586418*^9, 3.8715238795505486`*^9}, {
   3.8715239096345563`*^9, 3.8715239313187246`*^9}, {3.8715242192945194`*^9, 
   3.871524243496939*^9}, {3.8715242755341425`*^9, 3.871524314191008*^9}, {
   3.8715243688554735`*^9, 3.871524446275215*^9}, {3.871524486236211*^9, 
   3.871524621701756*^9}, {3.8715246648590713`*^9, 3.8715246890124865`*^9}, {
   3.871525226340214*^9, 3.871525234897069*^9}}],

Cell[BoxData["134043"], "Output",
 CellChangeTimes->{
  3.871519462094837*^9, 3.87152176848358*^9, {3.8715223500116096`*^9, 
   3.871522358764485*^9}, 3.8715224372073283`*^9, 3.871522510395646*^9, {
   3.871522817968401*^9, 3.8715228363472385`*^9}, {3.871522907407344*^9, 
   3.871522921886791*^9}, 3.8715230122868304`*^9, 3.871523518020399*^9, {
   3.8715237410086956`*^9, 3.8715237460111957`*^9}, 3.871524243919982*^9, 
   3.8715242760641956`*^9, 3.871524309333522*^9, {3.8715243714937377`*^9, 
   3.871524420034591*^9}, {3.8715244890944967`*^9, 3.8715245181764045`*^9}, {
   3.871524598825468*^9, 3.871524623004886*^9}, 3.871524690989684*^9}]
}, Open  ]]
}, Open  ]],

Cell[CellGroupData[{

Cell["\[FilledSquare]48. Self powers", "Subsubsection",
 CellChangeTimes->{
  3.825800627408572*^9, {3.8346300813595977`*^9, 3.8346300977205973`*^9}, {
   3.834700165964158*^9, 3.834700173167878*^9}, {3.8347104271931973`*^9, 
   3.8347104342419024`*^9}, {3.834712980725525*^9, 3.83471298277773*^9}, 
   3.8350564587130947`*^9, 3.871095596547323*^9, 3.871518778771512*^9, 
   3.8715188816367974`*^9, 3.8715232832339225`*^9, 3.871523326033202*^9, {
   3.871525157961376*^9, 3.871525166961276*^9}}],

Cell[TextData[{
 "The series, ",
 Cell[BoxData[
  FormBox[
   SuperscriptBox["1", "1"], TraditionalForm]],
  FormatType->"TraditionalForm"],
 " + ",
 Cell[BoxData[
  FormBox[
   SuperscriptBox["2", "2"], TraditionalForm]],
  FormatType->"TraditionalForm"],
 " ",
 Cell[BoxData[
  FormBox[
   RowBox[{"+", 
    SuperscriptBox["3", "3"]}], TraditionalForm]],
  FormatType->"TraditionalForm"],
 " + \[Ellipsis] + ",
 Cell[BoxData[
  FormBox[
   SuperscriptBox["10", "10"], TraditionalForm]],
  FormatType->"TraditionalForm"],
 " = 10405071317.\nFind the last ten digits of the series, ",
 Cell[BoxData[
  FormBox[
   SuperscriptBox["1", "1"], TraditionalForm]],
  FormatType->"TraditionalForm"],
 " + ",
 Cell[BoxData[
  FormBox[
   SuperscriptBox["2", "2"], TraditionalForm]],
  FormatType->"TraditionalForm"],
 " ",
 Cell[BoxData[
  FormBox[
   RowBox[{"+", 
    SuperscriptBox["3", "3"]}], TraditionalForm]],
  FormatType->"TraditionalForm"],
 "+ \[Ellipsis] + ",
 Cell[BoxData[
  FormBox[
   SuperscriptBox["1000", "1000"], TraditionalForm]],
  FormatType->"TraditionalForm"],
 "."
}], "Text",
 CellChangeTimes->{
  3.8258006477536063`*^9, {3.8346301102865973`*^9, 3.834630121139598*^9}, {
   3.8347001854861097`*^9, 3.8347001931898804`*^9}, {3.8347003471362734`*^9, 
   3.8347003508666463`*^9}, {3.8347003832158813`*^9, 
   3.8347004012886877`*^9}, {3.8347104396974473`*^9, 
   3.8347106499684725`*^9}, {3.834712987471199*^9, 3.8347130425857105`*^9}, {
   3.871095605592228*^9, 3.8710956137700453`*^9}, {3.871518867153349*^9, 
   3.8715188869073243`*^9}, {3.871518990423675*^9, 3.8715190152761602`*^9}, {
   3.8715233156041594`*^9, 3.871523329240523*^9}, {3.8715234568092785`*^9, 
   3.8715234642130184`*^9}, {3.8715251642320037`*^9, 3.871525169267507*^9}, 
   3.8715252515477343`*^9, {3.871525761917766*^9, 3.8715258061781917`*^9}}],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{
  RowBox[{
   RowBox[{"IntegerDigits", "[", 
    RowBox[{"Sum", "[", 
     RowBox[{
      RowBox[{"n", "^", "n"}], ",", " ", 
      RowBox[{"{", 
       RowBox[{"n", ",", " ", "1000"}], "}"}]}], "]"}], "]"}], "//", 
   RowBox[{
    RowBox[{"Take", "[", 
     RowBox[{"#", ",", 
      RowBox[{"-", "10"}]}], "]"}], "&"}]}], "//", "FromDigits"}]], "Code",
 CellChangeTimes->{
  3.871525388812459*^9, {3.871525941257698*^9, 3.871526022032775*^9}}],

Cell[BoxData["9110846700"], "Output",
 CellChangeTimes->{3.871525430033581*^9, 3.8715259509436665`*^9, 
  3.871525986937266*^9, 3.8715260224658184`*^9}]
}, Open  ]]
}, Open  ]],

Cell[CellGroupData[{

Cell["\[FilledSquare]49. Prime permutations", "Subsubsection",
 CellChangeTimes->{
  3.825800627408572*^9, {3.8346300813595977`*^9, 3.8346300977205973`*^9}, {
   3.834700165964158*^9, 3.834700173167878*^9}, {3.8347104271931973`*^9, 
   3.8347104342419024`*^9}, {3.834712980725525*^9, 3.83471298277773*^9}, 
   3.8350564587130947`*^9, 3.871095596547323*^9, 3.871518778771512*^9, 
   3.8715188816367974`*^9, 3.8715232832339225`*^9, 3.871523326033202*^9, {
   3.871525157961376*^9, 3.871525166961276*^9}, 3.8715260980863795`*^9, 
   3.872131932892585*^9}],

Cell["\<\
The arithmetic sequence, 1487, 4817, 8147, in which each of the terms \
increases by 3330, is unusual in two ways: (i) each of the three terms are \
prime, and, (ii) each of the 4-digit numbers are permutations of one another.

There are no arithmetic sequences made up of three 1-, 2-, or 3-digit primes, \
exhibiting this property, but there is one other 4-digit increasing sequence.

What 12-digit number do you form by concatenating the three terms in this \
sequence?\
\>", "Text",
 CellChangeTimes->{
  3.8258006477536063`*^9, {3.8346301102865973`*^9, 3.834630121139598*^9}, {
   3.8347001854861097`*^9, 3.8347001931898804`*^9}, {3.8347003471362734`*^9, 
   3.8347003508666463`*^9}, {3.8347003832158813`*^9, 
   3.8347004012886877`*^9}, {3.8347104396974473`*^9, 
   3.8347106499684725`*^9}, {3.834712987471199*^9, 3.8347130425857105`*^9}, {
   3.871095605592228*^9, 3.8710956137700453`*^9}, {3.871518867153349*^9, 
   3.8715188869073243`*^9}, {3.871518990423675*^9, 3.8715190152761602`*^9}, {
   3.8715233156041594`*^9, 3.871523329240523*^9}, {3.8715234568092785`*^9, 
   3.8715234642130184`*^9}, {3.8715251642320037`*^9, 3.871525169267507*^9}, 
   3.8715252515477343`*^9, {3.871525761917766*^9, 3.8715258061781917`*^9}, 
   3.871526106013172*^9, {3.872131852158512*^9, 3.872131853422639*^9}}],

Cell[BoxData[""], "Code",
 CellChangeTimes->{
  3.871525388812459*^9, {3.871525941257698*^9, 3.871526022032775*^9}, 
   3.8715261166852393`*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell["\[FilledSquare]50. Consecutive prime sum", "Subsubsection",
 CellChangeTimes->{
  3.825800627408572*^9, {3.8346300813595977`*^9, 3.8346300977205973`*^9}, {
   3.834700165964158*^9, 3.834700173167878*^9}, {3.8347104271931973`*^9, 
   3.8347104342419024`*^9}, {3.834712980725525*^9, 3.83471298277773*^9}, 
   3.8350564587130947`*^9, 3.871095596547323*^9, 3.871518778771512*^9, 
   3.8715188816367974`*^9, 3.8715232832339225`*^9, 3.871523326033202*^9, {
   3.871525157961376*^9, 3.871525166961276*^9}, 3.8715260980863795`*^9, 
   3.872131932892585*^9, {3.8721323069969916`*^9, 3.8721323097372656`*^9}}],

Cell["\<\
The prime 41, can be written as the sum of six consecutive primes:

41 = 2 + 3 + 5 + 7 + 11 + 13
This is the longest sum of consecutive primes that adds to a prime below \
one-hundred.

The longest sum of consecutive primes below one-thousand that adds to a \
prime, contains 21 terms, and is equal to 953.

Which prime, below one-million, can be written as the sum of the most \
consecutive primes?\
\>", "Text",
 CellChangeTimes->{
  3.8258006477536063`*^9, {3.8346301102865973`*^9, 3.834630121139598*^9}, {
   3.8347001854861097`*^9, 3.8347001931898804`*^9}, {3.8347003471362734`*^9, 
   3.8347003508666463`*^9}, {3.8347003832158813`*^9, 
   3.8347004012886877`*^9}, {3.8347104396974473`*^9, 
   3.8347106499684725`*^9}, {3.834712987471199*^9, 3.8347130425857105`*^9}, {
   3.871095605592228*^9, 3.8710956137700453`*^9}, {3.871518867153349*^9, 
   3.8715188869073243`*^9}, {3.871518990423675*^9, 3.8715190152761602`*^9}, {
   3.8715233156041594`*^9, 3.871523329240523*^9}, {3.8715234568092785`*^9, 
   3.8715234642130184`*^9}, {3.8715251642320037`*^9, 3.871525169267507*^9}, 
   3.8715252515477343`*^9, {3.871525761917766*^9, 3.8715258061781917`*^9}, 
   3.871526106013172*^9, {3.872131852158512*^9, 3.872131853422639*^9}, 
   3.8721323159458866`*^9}],

Cell[BoxData[
 RowBox[{"(*", 
  RowBox[{
  "\:4e00\:767e\:4e07\:4ee5\:4e0b\:7684\:8fde\:7eed\:8d28\:6570\:96c6\:5408\
\:53ef\:4ee5\:627e\:5230", "\:ff0c", 
   "\:90a3\:4e48\:95ee\:9898\:5c31\:662f\:627e\:5230\:4e00\:4e2a\:6700\:957f\
\:7684\:8fde\:7eed\:8d28\:6570\:4e32", "\:ff0c", 
   "\:4f7f\:5f97\:4ed6\:4eec\:7684\:548c\:8fd8\:662f\:8d28\:6570", "\:3002", 
   "\:76f8\:5f53\:4e8e\:4e00\:4e2a\:53ef\:4ee5\:53d8\:5316\:7684\:6ed1\:52a8\
\:7a97\:53e3", "\:ff0c", 
   RowBox[{
   "\:5148\:4ece\:7a97\:53e3\:6700\:5927\:7684\:5f00\:59cb\:9a8c\:8bc1", "\n",
     "\:7a97\:53e3\:4e00\:6b21\:51cf\:5c0f\:4e00"}], "\:ff0c", 
   "\:4ece\:5de6\:8fb9\:6ed1\:5230\:53f3\:8fb9", "\:ff0c", 
   "\:6ed1\:4e00\:6b21\:9a8c\:8bc1\:4e00\:6b21"}], "*)"}]], "Code",
 CellChangeTimes->{
  3.871525388812459*^9, {3.871525941257698*^9, 3.871526022032775*^9}, 
   3.8715261166852393`*^9, {3.872132562718561*^9, 3.872132574048694*^9}, {
   3.8721326133796268`*^9, 3.8721326136816573`*^9}, {3.872132663808669*^9, 
   3.872132693774666*^9}, {3.8721328300872955`*^9, 3.872132875177804*^9}, {
   3.872199795964406*^9, 3.872199948459654*^9}}]
}, Open  ]]
}, Open  ]]
},
WindowToolbars->"EditBar",
WindowSize->{1600, 816},
WindowMargins->{{-8, Automatic}, {Automatic, -8}},
CellContext->Notebook,
Magnification:>1.3 Inherited,
FrontEndVersion->"11.0 for Microsoft Windows (64-bit) (2016\:5e7410\:67088\
\:65e5)",
StyleDefinitions->"Default.nb"
]
(* End of Notebook Content *)

(* Internal cache information *)
(*CellTagsOutline
CellTagsIndex->{}
*)
(*CellTagsIndex
CellTagsIndex->{}
*)
(*NotebookFileOutline
Notebook[{
Cell[CellGroupData[{
Cell[580, 22, 207, 4, 117, "Title"],
Cell[CellGroupData[{
Cell[812, 30, 155, 2, 43, "Subsubsection"],
Cell[970, 34, 346, 7, 64, "Text"],
Cell[CellGroupData[{
Cell[1341, 45, 2201, 49, 162, "Code"],
Cell[3545, 96, 508, 7, 39, "Output"]
}, Open  ]]
}, Open  ]],
Cell[CellGroupData[{
Cell[4102, 109, 211, 3, 43, "Subsubsection"],
Cell[4316, 114, 1262, 27, 141, "Text"],
Cell[CellGroupData[{
Cell[5603, 145, 3327, 69, 207, "Code"],
Cell[8933, 216, 2250, 31, 115, "Output"]
}, Open  ]]
}, Open  ]],
Cell[CellGroupData[{
Cell[11232, 253, 266, 4, 43, "Subsubsection"],
Cell[11501, 259, 3596, 121, 290, "Text"],
Cell[CellGroupData[{
Cell[15122, 384, 6286, 131, 258, "Code"],
Cell[21411, 517, 577, 8, 39, "Output"]
}, Open  ]]
}, Open  ]],
Cell[CellGroupData[{
Cell[22037, 531, 304, 4, 43, "Subsubsection"],
Cell[22344, 537, 1207, 31, 118, "Text"],
Cell[23554, 570, 2369, 32, 65, "Code"]
}, Open  ]],
Cell[CellGroupData[{
Cell[25960, 607, 377, 6, 43, "Subsubsection"],
Cell[26340, 615, 826, 17, 214, "Text"],
Cell[27169, 634, 2793, 40, 65, "Code"]
}, Open  ]],
Cell[CellGroupData[{
Cell[29999, 679, 434, 7, 43, "Subsubsection"],
Cell[30436, 688, 1761, 48, 325, "Text"],
Cell[CellGroupData[{
Cell[32222, 740, 5541, 102, 234, "Code"],
Cell[37766, 844, 321, 5, 39, "Output"]
}, Open  ]]
}, Open  ]],
Cell[CellGroupData[{
Cell[38136, 855, 457, 6, 43, "Subsubsection"],
Cell[38596, 863, 1171, 21, 191, "Text"],
Cell[CellGroupData[{
Cell[39792, 888, 4932, 85, 138, "Code"],
Cell[44727, 975, 645, 9, 39, "Output"]
}, Open  ]]
}, Open  ]],
Cell[CellGroupData[{
Cell[45421, 990, 495, 7, 43, "Subsubsection"],
Cell[45919, 999, 1835, 55, 68, "Text"],
Cell[CellGroupData[{
Cell[47779, 1058, 468, 14, 65, "Code"],
Cell[48250, 1074, 152, 2, 39, "Output"]
}, Open  ]]
}, Open  ]],
Cell[CellGroupData[{
Cell[48451, 1082, 552, 8, 43, "Subsubsection"],
Cell[49006, 1092, 1309, 22, 164, "Text"],
Cell[50318, 1116, 144, 3, 65, "Code"]
}, Open  ]],
Cell[CellGroupData[{
Cell[50499, 1124, 605, 8, 43, "Subsubsection"],
Cell[51107, 1134, 1264, 25, 214, "Text"],
Cell[52374, 1161, 1115, 20, 90, "Code"]
}, Open  ]]
}, Open  ]]
}
]
*)

